package com.yunwuliu.controller;

import com.yunwuliu.request.RegisterRequest;
import com.yunwuliu.response.CommonResponse;
import com.yunwuliu.response.RegisterResponse;
import com.yunwuliu.service.RegisterService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 注册接口
 * @author 16375
 * @date 2025/8/12 13:22
 * @version 1.0
 */
@RestController
@RequestMapping
public class RegisterController{

    @Resource
    private RegisterService registerService;

    @PostMapping("/register")
    public <T> CommonResponse<T> register(RegisterRequest request) {
        registerService.register(request);
        return RegisterResponse.success(null);
    }
}


